<div class="m">
    <a href="staticblock/add" style="float: right; margin-top: 14px; margin-right: 100px;">
        <span class="add_buttom"></span>
        Добавить
    </a>
    <div class="pagetitle icon-48-article-add"><h3>Менеджер статических блоков: Список </h3></div>
    <br clear="all" />
</div>
<?php
if ($this->session->flashdata('message')){
    echo "<div class='status_box'>".$this->session->flashdata('message')."</div>";
}
?>
<div class="gallery_grid">
    <table class="gallery_table" style="width: 100%; background-color: #f3f3f3; color: #666; border-collapse: separate;
border-spacing: 2px;
border-color: gray;">
        <thead style="border-spacing: 1px; color: #666;">
        <tr style="border-spacing: 1px; color: #666;">
            <th width="20" style="text-align: center; background: #f7f7f7; color: #666; border-bottom: 1px solid #CCC;border-left: 1px solid #fff;"> Название</th>
            <th width="40" style="text-align: center; background: #f7f7f7; color: #666; border-bottom: 1px solid #CCC;border-left: 1px solid #fff;"> Описание</th>
            <th width="20" style="text-align: center; background: #f7f7f7; color: #666; border-bottom: 1px solid #CCC;border-left: 1px solid #fff;"> Галерея</th>
            <th style="text-align: center; background: #f7f7f7; color: #666; border-bottom: 1px solid #CCC;border-left: 1px solid #fff;"> Опубликовано</th>
            <th style="text-align: center; background: #f7f7f7; color: #666; border-bottom: 1px solid #CCC;border-left: 1px solid #fff;"> Действия</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach( $staticblock_list as $i => $block ): ?>
            <tr class="<?php echo $i%2? 'row0' : 'row1' ?>"   style="border: 1px solid #fff;">
                <td width="20%" style=" border: 1px solid #fff;" >
                    <div class="thums_block" style=" width: 128px; float: left;margin-left: 28%;">
                        <?php echo $block['name'] ?>
                    </div>
                </td>
                <td  style="width: 20%; border: 1px solid #fff;" >
                    <div class="category_name" style=" float: left; ">
                        <?php //TODO Обрезать текст  ?>
                        <?php echo $block['content'];?>
                    </div>
                </td>

                <td style=" border: 1px solid #fff;" >
                    <div class="category_name" style=" float: left; ">
                        <?php echo $block['gallery_id'];?>
                    </div>
                </td>
                <td style=" border: 1px solid #fff;text-align: center;" >
                    <?php if($block['active']):?>
                    <a href="staticblock/active/<?php echo $block['id'];?>" class="active">&nbsp;</a>
                    <?php else: ?>
                    <a href="staticblock/active/<?php echo $block['id'];?>" class="deactive">&nbsp;</a>
                    <?php endif; ?>
                </td>
                <td style=" border: 1px solid #fff;" >
                    <div class="category_actions" style="text-align: center;">
                        <a href="edit/<?php echo $block['id'];?>"> Редактировать</a> |
                        <a href="staticblock/delblock/<?php echo $block['id'];?>"> Удалить</a>
                    </div>
                </td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</div>